package com.foreknow.dao;

import com.foreknow.entity.User;

import java.sql.SQLException;
import java.util.List;

public interface UserDao {
    /**
     * 添加user用户信息
     * @param user
     * @return
     * @throws SQLException
     */
    public boolean userInsert(User user) throws SQLException;

    /**
     * 修改user用户信息
     * @param user
     * @return
     * @throws SQLException
     */
    public boolean userUpdate(User user) throws SQLException;

    /**
     * 删除user用户信息
     * @param id
     * @return
     * @throws SQLException
     */
    public boolean userDelete(Integer id) throws SQLException;

    /**
     * 查询所有user用户信息
     * @return
     * @throws SQLException
     */
    public List<Object[]> userSelectAll() throws SQLException;

    /**
     * 按名字查询user用户信息
     * @param username
     * @return
     * @throws SQLException
     */
    public User userSelect(String username) throws SQLException;

}
